package com.dream.technology.db.dao;

import com.dream.technology.db.entity.RcFlow;
import com.dream.technology.db.entity.RcFlowQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RcFlowMapper {
    int countByExample(RcFlowQuery example);

    int deleteByExample(RcFlowQuery example);

    int deleteByPrimaryKey(Long id);

    int insert(RcFlow record);

    int insertSelective(RcFlow record);

    List<RcFlow> selectByExample(RcFlowQuery example);

    RcFlow selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") RcFlow record, @Param("example") RcFlowQuery example);

    int updateByExample(@Param("record") RcFlow record, @Param("example") RcFlowQuery example);

    int updateByPrimaryKeySelective(RcFlow record);

    int updateByPrimaryKey(RcFlow record);


    /**
     * 修改规则 查看应用该规则的规则流程
     * 修改规则验证
     * @param ruleId
     * @return
     */
    List<RcFlow> selectRcFlowByIdInList(Long ruleId);

    /**
     * 风控用户标签修改前检查 返回引用该标签的流程集合
     * @param customerTag
     * @return
     */
	List<RcFlow> queryFlowByTag(@Param("childItemType") Integer childItemType, @Param("customerTag") Long customerTag);
	
}